from bs4 import BeautifulSoup

# 处理Html表单数据
def build_html(data_html):
    form_html = BeautifulSoup(data_html, "html.parser")
    html_data = {}
    for input in form_html.findAll("input"):
        name = input.get("name")
        value = input.get("value")
        if name and value is not None:
            html_data[name] = value
    return html_data